package com.solutec.dia4;

public class Thema2_WhileDoWhile {

	public static void main(String[] args) {

		System.out.println("------------------------------------");
		System.out.println("--------- While Schleife------------");

//		while( true ){
//			System.out.println("laufe ... ");
//		}
		//-------------------------------
		for (int i=0; i<5; i++){
			System.out.print(i +" ");
		}
		System.out.println();
		
		//-------------------------------
		for (int i=0; i<5;){
			System.out.print(i++ +" ");
		}
		System.out.println();
		
		//-------------------------------
		int i=0;
		while (i < 5){
			System.out.print(i + " ");
			i++;
		}
		System.out.println();
		
		i = 0;
		while (i < 5){
			System.out.print(i++ + " ");
		}
		System.out.println();

		i = -1;
		while (++i < 5){
			System.out.print(i + " ");
		}
		System.out.println();
		
		
		System.out.println("-------------------------------");
		System.out.println("---------Do - While------------");

		i = 0;
		do{
			System.out.print(i + " ");
			i++;
		}while(i<5);
		System.out.println();
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		

	}

}
